"""
Evennia settings file.

The full options are found in the default settings file found here:

/home/cqc/mud/muddery/evennia/evennia/settings_default.py
/home/cqc/mud/muddery/muddery/settings_default.py

Note: Don't copy more from the default file than you actually intend to
change; this will make sure that you don't overload upstream updates
unnecessarily.

"""

# Use the defaults from Evennia unless explicitly overridden
import os
from evennia.settings_default import *
from muddery.settings_default import *

######################################################################
# Evennia base server config
############################################################# #########

# <未登入用户>命令导入地址
CMDSET_UNLOGGEDIN = "command.default_cmdset.UnloggedinCmdSet"
# # <以登入用户>命令导入地址
# CMDSET_SESSION = "commands.default_cmdsets.SessionCmdSet"
# # Default set for logged in account with characters (fallback)
# CMDSET_CHARACTER = "commands.default_cmdsets.CharacterCmdSet"
# # Command set for accounts without a character (ooc)
# CMDSET_ACCOUNT = "commands.default_cmdsets.AccountCmdSet"

# This is a security setting protecting against host poisoning
# attacks.  It defaults to allowing all. In production, make
# sure to change this to your actual host addresses/IPs.
ALLOWED_HOSTS = ['*']

TELNET_ENABLED = True
TELNET_PORTS = [4000]
TELNET_INTERFACES = ['0.0.0.0']

# The webserver sits behind a Portal proxy. This is a list
# of tuples (proxyport,serverport) used. The proxyports are what
# the Portal proxy presents to the world. The serverports are
# the internal ports the proxy uses to forward data to the Server-side
# webserver (these should not be publicly open)
WEBSERVER_PORTS = [(8000, 5001)]

# Server-side websocket port to open for the webclient.
WEBSOCKET_CLIENT_PORT = 8001

# The game server opens an AMP port so that the portal can
# communicate with it.
AMP_PORT = 5000

# Language code for this installation. All choices can be found here:
# http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
LANGUAGE_CODE = 'zh-cn'


######################################################################
# Django web features
######################################################################

# URL that handles the webclient.
WEBCLIENT_ROOT = os.path.join(GAME_DIR, "web", "static", "webclient")

# The secret key is randomly seeded upon creation. It is used to sign
# Django's cookies. Do not share this with anyone. Changing it will
# log out all active web browsing sessions. Game web client sessions
# may survive.
SECRET_KEY = '$U=o;`a<,8[L1*ei+-O]cQb"hfM0!/|2RK#W>Z:_'



# DATABASES = {
#     'default': {
#             'ENGINE': 'django.db.backends.mysql',
#             'NAME': 'ws',
#             'USER': 'ws',
#             'PASSWORD': 'ws123',
#             'HOST': '47.110.226.13',
#             'PORT': '3306'
#     },
#     'worlddata': {
#             'ENGINE': 'django.db.backends.mysql',
#             'NAME': 'ws_worlddata',
#             'USER': 'ws_worlddata',
#             'PASSWORD': 'ws123',
#             'HOST': '47.110.226.13',
#             'PORT': '3306'
#     }}
# DATABASE_ROUTERS = ['muddery.worlddata.db.database_router.DatabaseAppsRouter']
# DATABASE_APPS_MAPPING = {'worlddata': 'worlddata',}